<div th:fragment="incShowMsg">
    <!--系统提示信息显示开始-->
    <div id="yuyin" style="display: none"></div>
    <script type="text/javascript" th:inline="javascript">
        /*<![CDATA[*/
        $(function () {
            toastr.options = {
                "closeButton": true,
                "debug": false,
                "progressBar": true,
                "positionClass": "toast-bottom-right",
                "onclick": null,
                "showDuration": "30000",
                "hideDuration": "30000",
                "timeOut": "30000",
                "extendedTimeOut": "30000",
                "showEasing": "swing",
                "hideEasing": "linear",
                "showMethod": "fadeIn",
                "hideMethod": "fadeOut"
            };
            indexAjax();
        });

        function indexAjax() {
            $.ajax({
                type: "get",
                dataType: "",
                url: "/index/msg",
                data: "",
                beforeSend: function () {
                },
                success: function (data) {
                    var result = eval("(" + data + ")");
                    var flag = 0;
                    if (result.orgNum != undefined && result.orgNum >= 1) {
                        toastr.info(result.orgNum + "位机构等待审核", "机构待审核");
                        flag = flag + result.orgNum;
                    }
                    if (result.shopNum != undefined && result.shopNum >= 1) {
                        toastr.info(result.shopNum + "位商户等待审核", "商户待审核");
                        flag = flag + result.shopNum;
                    }
                    if (result.riskNum != undefined && result.riskNum >= 1) {
                        toastr.warning(result.riskNum + "条风控等待外呼", "分控订单外呼");
                        flag = flag + result.riskNum;
                    }
                    if (result.taskBankNum != undefined && result.taskBankNum >= 1) {
                        toastr.warning(result.taskBankNum + "位商户提交银行卡变更", "商户银行卡变更");
                        flag = flag + result.taskBankNum;
                    }
                    if (result.settleFailNum != undefined && result.settleFailNum >= 1) {
                        toastr.error(result.settleFailNum + "条结算订单信息保留", "订单保留");
                        flag = flag + result.settleFailNum;
                    }
                    if (parseInt(flag) > 0) {
                        setTimeout("indexAjax()", 60 * 1000);
                    } else {
                        setTimeout("indexAjax()", 60 * 1000);
                    }
                }
            })
        }

        function browserRedirect() {
            var sUserAgent = navigator.userAgent.toLowerCase();
            var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
            var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
            var bIsMidp = sUserAgent.match(/midp/i) == "midp";
            var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
            var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
            var bIsAndroid = sUserAgent.match(/android/i) == "android";
            var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
            var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
            if (bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM) {
                return 0;
            } else {
                return 1;
            }
        }
        /*]]>*/
    </script>
    <!--系统提示信息显示结束-->
</div>